<template>
  <div>
    <Input @add="add"></Input>
    <List :list="list" @del="del"></List>
  </div>
</template>

<script>
import Input from "./input.vue";
import List from "./list.vue";
export default {
  data() {
    return {
      list: ["html", "css"],
    };
  },
  methods: {
    add(value) {
      this.list.push(value);
    },
    del(i) {
      this.list.splice(i, 1);
    },
  },
  props: {},
  components: {
    Input,
    List,
  },
};
</script>

<style scoped></style>
